import { $t } from '@/utils/vue_pbulic'
interface UserDataType {
  label: string
  value: string
  icon?: string
}

class UserData implements UserDataType {
  constructor(public label: string, public value: string, public icon?: string) {
    this.label = label
    this.value = value
    if (icon) {
      this.icon = icon
    }
  }
}

class SetUserData extends UserData {
  constructor(public label: string, public value: string, public maxlength: string) {
    super(label, value)
    this.maxlength = maxlength
  }
}

export const user_data = [
  new UserData($t('login.name'), 'userName', 'user'),
  new UserData($t('router.personal_center.phone'), 'phonenumber', 'phone'),
  new UserData($t('router.personal_center.email'), 'email', 'email')
]

export const set_user_data = [
  new SetUserData($t('login.name'), 'userName', '30'),
  new SetUserData($t('router.personal_center.phone'), 'phonenumber', '11'),
  new SetUserData($t('router.personal_center.email'), 'email', '50')
]
export const set_pwd = [
  new UserData($t('router.personal_center.oldPassword'), 'oldPassword'),
  new UserData($t('router.personal_center.newPassword'), 'newPassword'),
  new UserData($t('router.personal_center.confirmPassword'), 'confirmPassword')
]
